<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>精灵图的使用</title>
    <style>
        .player {
            width: 100px;
            height: 30px;
            background-image: url('img/sprite.png');
            background-position: 206px 0;
        }
        /* 以下代码只在鼠标悬停时生效 */
        .player:hover {
            background-position: 206px 125px;
        }
        .gril {
            width: 100px;
            height: 30px;
            background-image: url('img/sprite.png');
            background-position: 206px 126px;
        }
        .input1 {
            outline: none;
        }
        /* 获取光标时生效 */
        .input1:focus {
            border-color: red;
            outline: none;
        }
    </style>
</head>
<body>
    <p>伪类选择器：一个特殊的状态 :hover</p>
    <div class="player"></div>
    <div class="gril"></div>
    <hr>
    <input type="text" class="input1">
</body>
</html>